package own.stu.jobgib.playown.vediodown.bili.model.seasons;

import com.google.gson.annotations.SerializedName;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

@lombok.Data
public class Page {
    @SerializedName("total")
    private int total;

    @SerializedName("page_num")
    private int pageNum;

    @SerializedName("page_size")
    private int pageSize;

    public List<Integer> pageNumList() {
        int num = total / pageSize;
        num = (total % pageSize == 0) ? num : num + 1;
        return IntStream.range(1, num + 1).boxed().sequential().filter(v -> v != pageNum).collect(Collectors.toList());
    }

    public static void main(String[] args) {
        System.out.println(IntStream.range(1, 10 + 1).boxed().sequential().filter(v -> v != 2).collect(Collectors.toList()));
    }
}
